<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link href="../app/bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
</head>
<body ng-controller="AppController">


<script src="../app/bower_components/jquery/dist/jquery.js"></script>
<script src="../app/bower_components/angular/angular.js"></script>

<script>
    var core = angular.module('core', []);
    core.factory('userService', function () {
        return {
            login: function () {
                console.log(1);
            }
        }
    });

    core.factory('accountService', function (userService) {
        return {
            check: function () {
                userService.login();
            }
        }
    });

    var app = angular.module('app', ['core']);

    app.factory('userService', function () {
        return {
            login: function () {
                console.log(2);
            }
        }
    });

    app.controller('AppController', function ($scope, accountService) {
        accountService.check();
    });
    app.directive('abc', function () {
        return {
            restrict: 'ACE',
            link: function (scope, element, attrs) {

            }
        }
    });

</script>
</body>
</html>